package po;

import io.appium.java_client.MobileElement;
import io.appium.java_client.android.AndroidDriver;
import org.openqa.selenium.WebElement;
import utils.WaitUtils;

/**
 * 搜索页面
 */
public class HomePage {
    AndroidDriver driver;
    public HomePage(AndroidDriver driver){
        this.driver=driver;
    }
    public HomePage isHaveAlert() {
        return this;
    }

    /**
     * 去搜索页面
     *
     * @return
     */
    public SearchPage toSearch(String key) {
        WebElement el = driver.findElementById("com.ygkj.chelaile.standard:id/cll_home_search");
        el.click();
        WaitUtils.sleep(5);
        return new SearchPage(driver);
    }

}
